$cs = "Data Source=ads819769220.my3w.com;User ID=ads819769220;Password=Fuxi#!35267;Initial Catalog=ads819769220_db;Connect Timeout=120" $cn = New-Object System.Data.SqlClient.SqlConnection $cs $cn.Open() $out = "C:\webhosting\data\upload" $res = New-Object System.Collections.Generic.List[string] $pat = [regex]'(? raw=$n valid=$valid") } catch { $res.Add("TABLE $k => ERR $($_.Exception.Message)") } } [System.IO.File]::WriteAllLines("$out\idscan3.txt", $res) Write-Output "IDSCAN3-DONE" $cn.Close()